package core
{
	import flash.system.Capabilities;
	
	import org.aisy.display.USprite;

	public class WinShow extends USprite
	{
		public function WinShow()
		{
		}
		
		public function connect(im:*):void
		{
			try {
				if (Boolean(parseInt(loaderInfo.parameters["center"]))) {
					im.stage.nativeWindow.x = (Capabilities.screenResolutionX - im.stage.nativeWindow.width) * 0.5;
					im.stage.nativeWindow.y = (Capabilities.screenResolutionY - im.stage.nativeWindow.height) * 0.5;
				}
				im.stage.nativeWindow.activate();
				im.stage.nativeWindow.orderToFront();
			}
			catch (error:*) {}
			im.Swf.remove(im.Swf.hasSwf("swf", parent));
			im = null;
		}
		
	}
}